// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Token} from "./Token.sol";

contract FakeDex {
    using SafeERC20 for IERC20;
    constructor() {}

    function swap(address tokenIn, address tokenOut, uint256 amountIn, uint256 amountOutMin) external {
        IERC20(tokenIn).safeTransferFrom(msg.sender, address(this), amountIn);
        Token(tokenOut).mint(amountOutMin);
        IERC20(tokenOut).transfer(msg.sender, amountOutMin);
    }
}
